﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    Debug="true" CodeBehind="SubmitProblem.aspx.cs" Inherits="mitasoft.ERS.Web.SubmitProblem" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="css/jquery.cleditor.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.cleditor.js" type="text/javascript"></script>
    <script type="text/javascript">
        //content from richeditor
        var fieldContent = '#<%= hiddenControl.ClientID %>';

        $(document).submit(function ()
        {
            $(fieldContent).val($('#problemContent').html());
            $('#problemContent').val('');
        });

        $(document).ready(function ()
        {
            $("#<%= btnSendProblem2.ClientID %>").button();
            $("#<%= btnClear.ClientID %>").button();

            $('#problemContent').cleditor();

            $("#dialog").dialog({
                autoOpen: false,
                modal: true,
                buttons: {
                    Ok: function ()
                    {
                        $(this).dialog('close');
                        showDialog = '';
                    }
                }
            });
        });
        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <%--Save dialog--%>
        <div id="dialog" title="Problem sent !">
            <p>
                Thanks for submitting the problem. Please wait until someone will contact you !
            </p>
        </div>
        <%--Page layout--%>
        <table>
            <tr>
                <td>
                    <span>Title</span>
                </td>
                <td>
                    <input id="problemTitle" runat="server" type="text" class="textbox" />
                </td>
            </tr>
            <tr>
                <td>
                    Project
                </td>
                <td>
                    <asp:DropDownList ID="ddlProjects" DataTextField="Name" DataValueField="ID" runat="server"
                        CssClass="textbox" Width="506" />
                </td>
            </tr>
            <tr>
                <td>
                    Type
                </td>
                <td>
                    <asp:DropDownList ID="ddlType" DataTextField="Description" DataValueField="ID" runat="server"
                        CssClass="textbox" Width="506" />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Description
                </td>
                <td>
                    <textarea id="problemContent" name="problemContent"></textarea>
                    <asp:HiddenField ID="hiddenControl" runat="server" />
                    <asp:HiddenField ID="hiddencontrolText" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="btnSendProblem2" CssClass="button" runat="server" Text="Send problem" />
                    <asp:Button ID="btnClear" CssClass="button" runat="server" Text="Clear" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
